package com.xzakota.minesweeper.ui.dialog;

import com.xzakota.minesweeper.controller.Game;
import com.xzakota.minesweeper.ui.dialog.templae.OptionDialog;

/**
 * 游戏选择对话框
 *
 * @author Xzakota
 */
public class GameOptionDialog extends OptionDialog {
    public GameOptionDialog(String message) {
        super(message);

        setCancelButton("再玩一局");
        setCancelAction(e -> {
            Game.dispatchEvent("newGame");
            closeWindow();
        });
    }
}
